package com.cml.dm.admin.service.impl;

import com.cml.dm.admin.mapper.DynamicSqlMapper;
import com.cml.dm.admin.service.QueryFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class DefaultQueryService implements QueryFactory<Map<String, Object>> {

    @Autowired
    private DynamicSqlMapper dynamicSqlMapper;

    @Override
    public List<Map<String, Object>> queryData(String sql) {
        return dynamicSqlMapper.queryList(sql);
    }
}
